home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
ma22#2.zip
/
EXAMPLE1.65
< prev
next >
Wrap
Text File
|
1991-08-21
|
1KB
|
52 lines
*
* Sample source file for the Rockwell 6502
*
* (this program does not do anything, it is only an example)
*
title Sample source file
*
* Definitions
*
cr equ $0d ;carriage return
lf equ 10 ;line feed
RAM: equ $2000 ;memory start
ppi0 equ $8000 ;ppi 0
crppi0 equ ppi0+1 ;control register
srppi0 equ ppi0+2 ;status register
flag equ 123 ;flag bit
offset set 0
*
* Variables
*
org RAM ;variables
key reserve 16 ;key buffer
table reserve 2+3*$10 ;address table
loop1:
offset set 9
*
* Program
*
lda #'*'
ldx $44,y
cmp (35,x)
cmp (22),y
ora flag
lda $1035
lda messg1+offset
ora #flag
ldx #10
jsr delay
jmp loop1
*
* Delay routine
*
delay: dex
rts
*
* Dummy data
*
routines word $1234,$f800,0 ;routine addresses
messg1 byte cr,lf,'String no 1.',0
messg2 byte cr,lf,lf,'Press a key.',0
end